/*******************************************************************************
 * @author scl
 * @email shchlu188@163.com
 ******************************************************************************/

#ifndef STM32F103VET6_ESP8266_BSP_INCLUDE_H
#define STM32F103VET6_ESP8266_BSP_INCLUDE_H

#include "sys_core.h"
#include "stm32f1xx_hal.h"

#define gpio_init(port, pin, mode, pull, speed)\
            do{\
                __HAL_RCC_##port##_CLK_ENABLE();\
                GPIO_InitTypeDef cnf ={pin,mode,pull,speed};\
                HAL_GPIO_Init(port, &cnf);\
            }while(0)
#define pin_high(port, pin) HAL_GPIO_WritePin(port,pin,GPIO_PIN_SET)
#define pin_low(port, pin) HAL_GPIO_WritePin(port,pin,GPIO_PIN_RESET)
#endif //STM32F103VET6_ESP8266_BSP_INCLUDE_H
